import ProductItem from "./Item";
import {Col, Row} from "antd";

export default ({title,list}:{title: string,list:Record<string, any>[]})=>{
  return (
    <div style={{marginBottom:24}}>
      <h4 style={{marginLeft:8,color:'#555',fontSize:18,fontWeight:500,lineHeight:'1.2'}}>{title}</h4>
      <Row>
        {
          list.map(item=>(
            <Col key={item.id} span={4} style={{padding:4}}>
              <ProductItem data={item} />
            </Col>
          ))
        }
      </Row>
    </div>
  )
}
